package com.date;

import java.util.Calendar;
//import java.util.GregorianCalendar;

public class CalendarClass {
	public static void main(String[] args){
		Calendar c = Calendar.getInstance();
//		Calendar c1 = new GregorianCalendar(); 
//		System.out.println(c);
		int year = c.get(Calendar.YEAR);
		int month = c.get(Calendar.MONTH)+1;
		int day = c.get(Calendar.DAY_OF_MONTH);
		int hour = c.get(Calendar.HOUR_OF_DAY)+1;
		int minute = c.get(Calendar.MINUTE);
		int second = c.get(Calendar.SECOND);
		int millisecond = c.get(Calendar.MILLISECOND);
		String[] weeks = {"Sun","Mon","Tues","Wed","Thurs","Fri","Sat"};
		int week = c.get(Calendar.DAY_OF_WEEK);
		
		StringBuilder sb = new StringBuilder();
		sb.append(year).append(" year ").append(month).append(" month ")
		.append(day).append(" day ").append(hour).append(":").append(minute)
		.append(":").append(second).append(" ").append(millisecond)
		.append("millisecond ").append(weeks[week]);
		
		System.out.println(sb.toString());
	}
}
